/**
 * 
 */
package nezumi.gui;

import java.awt.Component;
import java.awt.Graphics2D;
import java.awt.Point;

import nezumi.state.State;

/**
 * @author rui
 * 
 */
public class MouseEntity extends ASpriteEntity {

	/**
	 * @param spriteRef
	 * @param state
	 */
	public MouseEntity(String spriteRef, State state, Component enclosingComp) {
		super(spriteRef, state, enclosingComp);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see nezumi.gui.ASpriteEntity#getLocation()
	 */
	@Override
	protected Point getLocation() {
		return state.getAgentState().getCurrPosInt();
	}

	@Override
	public void draw(Graphics2D g) {
		final Point loc = this.translatePoint(getLocation());

		sprite.drawCentered(g, loc.x, loc.y, this.state.getAgentState()
				.getCurrOrientation()
				- Math.PI / 4, this.enclosingComp.getBounds());
	}
}
